const mongoose = require("mongoose")

mongoose.connect("mongodb+srv://2050277316:1fUdDt69HM5D8GoJ@cluster0.acyh5.mongodb.net/?retryWrites=true")
const  con = mongoose.connection

con.on("open",()=>{
    console.log("连接数据库成功");
})
con.on("error",err=>{
    console.log("数据库连接失败",err);
})
module.exports=mongoose